<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #box{
            width: 340px;
            margin: 50px;
            border: 1px solid #ccc;
        }
        #box .title{
            height: 45px;
            line-height: 45px;
            padding-left: 15px;
            font-size: 18px;
            color: white;
            font-weight: bold;
            background-color: #e9185a;
        }
        #box li{
            list-style: none;
            color: #5f6162;
            border-bottom: 2px dashed #ccc;
        }
        #box li p{
            margin-top: 10px;
        }
        #box li span{
            display: inline-block;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            text-align: center;
            line-height: 25px;
            color: white;
            font-weight: bold;
            background-color: #373932;
            margin-left: 10px;
        }
        #box .price{
            text-align: center;
            margin-bottom: 10px;
        }
        #box .img{
            text-align: center;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="title">大家都喜欢的彩妆</div>
        <ul>
            <li v-for="(item,index) in arr">
                <p><span>{{item.num}}</span> {{item.name}}</p>
                <div class="img">
                    <img :src="(item.imgUrl)" alt="">
                </div>
                <p class="price">{{item.desc}}</p>
            </li>
        </ul>
    </div>
    <script src="./js/vue.js"></script>
    <script src="./js/axios.min.js"></script>
    <script>
        let vm = new Vue({
            el: "#box",
            data: {
                arr: []
            },
            mounted(){
                this.arr=[{
                    num: 1,
                    name: 'Za姬芮新能真皙美白隔离霜 35g',
                    imgUrl: "image/icon-1.jpg",
                    desc: "￥59.90 最近13403人购买"
                }, {
                    num: 2,
                    name: '美宝莲精纯矿物奇妙新颜乳霜BB霜 30ml',
                    imgUrl: "image/icon-2.jpg",
                    desc: "￥89.00 最近13610人购买"
                }, {
                    num: 3,
                    name: '菲奥娜水漾CC霜40g',
                    imgUrl: "image/icon-3.jpg",
                    desc: "￥59.90 最近13403人购买"
                }, {
                    num: 4,
                    name: 'HC 蝶翠诗橄榄卸妆油 200ml',
                    imgUrl: "image/icon-4.jpg",
                    desc: "￥169.00 最近16757人购买"
                }]
            }
        }) 
    </script>
</body>

</html>